﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DoAn.DAO;
using DoAn.DTO;
using System.Data;

namespace DoAn.BUS
{
    public class TaiKhoanBUS
    {
        public static void dangKiTK(TaiKhoanDTO taik)
        {
            TaiKhoanDAO.dangKiTK(taik);
        }

        public static bool kichHoatTaiKhoan(TaiKhoanDTO tk)
        {
            return TaiKhoanDAO.kichHoatTaiKhoan(tk);
        }

        public static DataTable dangNhap(TaiKhoanDTO tk)
        {
            return TaiKhoanDAO.dangNhap(tk);
        }

        public static bool isLogged()
        {
            return TaiKhoanDAO.isLogged();
        }

        public static string tenTaiKhoan()
        {
            return TaiKhoanDAO.tenTaiKhoan();
        }

        public static string loaiTaiKhoan()
        {
            return TaiKhoanDAO.loaiTaiKhoan();
        }

        public static DataTable loadTaiKhoan(TaiKhoanDTO tk)
        {
            return TaiKhoanDAO.loadTaiKhoan(tk);
        }

        public static void thayDoiEmail(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.thayDoiEmail(tk);
        }

        public static void doiMatKhau(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.doiMatKhau(tk);
        }

        public static void suaHoTen(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaHoTen(tk);
        }

        public static void suaNgaySinh(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaNgaySinh(tk);
        }

        public static void suaDiaChi(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaDiaChi(tk);
        }

        public static void suaChuThe(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaChuThe(tk);
        }

        public static void suaNgayHH(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaNgayHH(tk);
        }

        public static void suaLoaiThe(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaLoaiThe(tk);
        }

        public static void suaMaThe(TaiKhoanDTO tk)
        {
            TaiKhoanDAO.suaMaThe(tk);
        }
        public static string laymathe(string tk)
        {
            return TaiKhoanDAO.laymathe(tk);
        }
        #region "Thuật Toán MD5, Sha1, Luhn"
    
        public static string getSHA1Hash(string input)
        {
            return TaiKhoanDAO.getSHA1Hash(input);
        }

        public static string getMd5Hash(string input)
        {
            return TaiKhoanDAO.getMd5Hash(input);
        }

        public static bool ValidateLuhn(string value)
        {
            return TaiKhoanDAO.ValidateLuhn(value);
        }

        #endregion
    }
}